import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listVersion(query) {
  return request({
    url: '/device/firmware/version/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getVersion(versionId) {
  return request({
    url: '/device/firmware/version/' + versionId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addVersion(data) {
  return request({
    url: '/device/firmware/version',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateVersion(data) {
  return request({
    url: '/device/firmware/version',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delVersion(versionId) {
  return request({
    url: '/device/firmware/version/' + versionId,
    method: 'delete'
  })
}

/**
 *
 * @param {*} query
 * @returns
 */
export function changeStatus(query) {
  return request({
    url: '/device/firmware/version/change',
    method: "post",
    params: query
  })
}

//过滤查询文件名以.bin结尾的固件管理列表
export function filterListBin(query){
  return request({
    url: '/device/firmware/version/list',
    method: 'get',
    params: query
  })
}
